package com.noob.susu.excel.entity;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * 字段结果
 *
 * @author shupeng_liao
 * @date 2019/12/12 15:24
 **/
@Getter
@Setter
public class FieldValueResult<T> implements Serializable {

    /**
     * 是否成功
     */
    private Boolean success;

    /**
     * 对象
     */
    private T model;

    /**
     * 错误信息
     */
    private String errorMessage;

    public FieldValueResult(Boolean success, T model, String errorMessage) {
        this.success = success;
        this.model = model;
        this.errorMessage = errorMessage;
    }

    public FieldValueResult() {
    }


    public static <T> FieldValueResult<T> getInstance() {
        return new FieldValueResult<>(true, null, null);
    }

}
